package personal.xjl.plusdemo.spring;

import lombok.Data;
import org.springframework.stereotype.Component;

@Component("target")
@Data
public class MyMath {
    private int n1,n2,result;
    public void add(int n1,int n2) {
        result= n1+n2;
        System.out.println(result);
    }
    public void subtract(int n1,int n2) {
        result= n1-n2;
        System.out.println(result);
    }
    public void plus(int n1,int n2) {
        result= n1*n2;
        System.out.println(result);
    }
    public void devide(int n1,int n2) {
        result= n1/n2;
        System.out.println(result);
    }
}
